package com.cy.核心编程.thead.basic.join;

public class Test1 {
    public static void main(String[] args) {
        MyTread mt = new MyTread();
        mt.start();

        for (int i = 0; i < 100; i++) {
            System.out.println("主线程："+i);
        }
        try {
            mt.join();//会让主线程等待子线程跑完，再继续执行
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("哈哈哈");
    }
}
